package com.project.core.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 用户实体类
 * @author 董小满
 * @date 2014-08-17
 */
public class Users implements Serializable {
	
	private static final long serialVersionUID = -3299956796319147787L;
	
	/** 主键自增 */
	private int usersid;
	/** 用户名 */
	private String usersname;
	/** 密码 */
	private String userspwd;
	/** 找回密码问题 */
	private String usersask;
	/** 找回密码答案 */
	private String usersanswer;
	/** E-Mail */
	private String usersemail;
	/** 注册时间 */
	private Date usersaddate;
	/** 商城用户权限ID */
	private int userssqx;
	/** 论坛用户权限ID */
	private int usersqx;
	/** 在线状态 */
	private int usersonline;
	/** IP地址 */
	private String usersip;
	/** 最后一次登陆时间 */
	private Date userslogindate;
	/** 登陆次数 */
	private int userslogincount;
	/** 权限集合 */
	private Set<Role> roleSet = new HashSet<Role>();
	
	public Users() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public String toString(Object str) {
		if(null!=str){
			return str.toString();
		}
		return "";
	}
	
	public Users(int usersid, String usersname, String userspwd,
			String usersask, String usersanswer, String usersemail,
			Date usersaddate, int userssqx, int usersqx, int usersonline,
			String usersip, Date userslogindate, int userslogincount) {
		super();
		this.usersid = usersid;
		this.usersname = usersname;
		this.userspwd = userspwd;
		this.usersask = usersask;
		this.usersanswer = usersanswer;
		this.usersemail = usersemail;
		this.usersaddate = usersaddate;
		this.userssqx = userssqx;
		this.usersqx = usersqx;
		this.usersonline = usersonline;
		this.usersip = usersip;
		this.userslogindate = userslogindate;
		this.userslogincount = userslogincount;
	}
	public int getUsersid() {
		return usersid;
	}
	public void setUsersid(int usersid) {
		this.usersid = usersid;
	}
	public String getUsersname() {
		return usersname;
	}
	public void setUsersname(String usersname) {
		this.usersname = usersname;
	}
	public String getUserspwd() {
		return userspwd;
	}
	public void setUserspwd(String userspwd) {
		this.userspwd = userspwd;
	}
	public String getUsersask() {
		return usersask;
	}
	public void setUsersask(String usersask) {
		this.usersask = usersask;
	}
	public String getUsersanswer() {
		return usersanswer;
	}
	public void setUsersanswer(String usersanswer) {
		this.usersanswer = usersanswer;
	}
	public String getUsersemail() {
		return usersemail;
	}
	public void setUsersemail(String usersemail) {
		this.usersemail = usersemail;
	}
	public Date getUsersaddate() {
		return usersaddate;
	}
	public void setUsersaddate(Date usersaddate) {
		this.usersaddate = usersaddate;
	}
	public int getUserssqx() {
		return userssqx;
	}
	public void setUserssqx(int userssqx) {
		this.userssqx = userssqx;
	}
	public int getUsersqx() {
		return usersqx;
	}
	public void setUsersqx(int usersqx) {
		this.usersqx = usersqx;
	}
	public int getUsersonline() {
		return usersonline;
	}
	public void setUsersonline(int usersonline) {
		this.usersonline = usersonline;
	}
	public String getUsersip() {
		return usersip;
	}
	public void setUsersip(String usersip) {
		this.usersip = usersip;
	}
	public Date getUserslogindate() {
		return userslogindate;
	}
	public void setUserslogindate(Date userslogindate) {
		this.userslogindate = userslogindate;
	}
	public Set<Role> getRoleSet() {
		return roleSet;
	}
	public void setRoleSet(Set<Role> roleSet) {
		this.roleSet = roleSet;
	}
	public int getUserslogincount() {
		return userslogincount;
	}
	public void setUserslogincount(int userslogincount) {
		this.userslogincount = userslogincount;
	}
	
}
